﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace SteroMood.StereoMood_Data
{
    [XmlRoot("tag")]
    public class Tag
    {
        /// <summary>
        /// value of the tag
        /// </summary>
        [XmlElement("value")]
        public string Value { get; set; }

        /// <summary>
        /// mood or activity
        /// </summary>
        [XmlElement("type")]
        public string MoodOrActivity { get; set; }
        
        /// <summary>
        /// weight in the main tag cloud
        /// </summary>
        [XmlElement("weight")]
        public int Popularity { get; set; }

        public override string ToString()
        {
            
            return Value.ToUpperFirstCase() + (Popularity != 0 ? ", ("+Popularity+")":"");
        }
    }

    [XmlRoot("tags")]
    public class Tags
    {
        /// <summary>
        /// returns a list of the top stereomood tags
        /// </summary>
        public static string UrlTop = "http://www.stereomood.com/api/tag/top.xml";

        /// <summary>
        /// returns a list of the tags selected by stereomood team by mood
        /// </summary>
        public static string UrlSelectedMood = "http://www.stereomood.com/api/tag/selected.xml?type=mood";

        /// <summary>
        /// returns a list of the tags selected by stereomood team by activity
        /// </summary>
        public static string UrlSelectedActivity = "http://www.stereomood.com/api/tag/selected.xml?type=activity";

        [XmlElement("tag")]
        public List<Tag> TagsList = new List<Tag>();
    }
}
